#ifndef CRC16_HPP
#define CRC16_HPP

#include <stdint.h>

namespace Modbus {

class CRC16Calculator {
public:
    void start(void);
    void feed(uint8_t chr);
    void feed(uint8_t *buffer,unsigned int size);
    uint16_t get(void);
private:
    uint8_t crc_h = 0xff;
    uint8_t crc_l = 0xff;
};

}

#endif
